﻿using System.Windows;
using System.Windows.Controls;

namespace 修为尽失.辅助.Selectors
{
    public class ContextMenuItemStyleSelector : StyleSelector
    {
        public Style MenuItemStyle { get; set; }
        public Style SeparatorStyle { get; set; }
        public Style ImageStyle { set; get; }
        public Style TextBlockStyle { set; get; }
        public override Style SelectStyle(object item, DependencyObject container)
        {
            if (item is MenuItem)
            {
                return MenuItemStyle;
            }

            if (item is Separator)
            {
                return SeparatorStyle;
            }

            if (item is Image)
            {
                return ImageStyle;
            }
            if (item is TextBlock)
                return TextBlockStyle;

            return null;
        }
    }
}
